#include <bits/stdc++.h>
using namespace std;
using ll=long long;
int main()
{
  ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
  ll n,w;cin>>n>>w;
  ll sum=0;
  ll flag=1;
  vector<ll> d(n+10);
  ll l=1e15;
  ll r=-1e15;
  while(n--)
  {
    ll s,t,p;
    cin>>s>>t>>p;
    d[s]+=p;
    d[t]-=p;
    l=min(l,s);
    r=max(r,t);
  }
  for(ll i=l;i<=r;++i) d[i]+=d[i-1];
  for(ll i=l;i<=r;++i)
  {
    if(d[i]>w)
    {
      cout<<"No";
      flag=0;
      break;
    }
  }
  if(flag) cout<<"Yes";
  return 0;
}
